home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / vector.lha / vector / vector_names.h < prev   
C/C++ Source or Header  |  1991-11-23  |  790b  |  29 lines

  1. #ifndef _VECTOR_NAMES_H
  2. #define _VECTOR_NAMES_H
  3.  
  4. #include <generic.h>
  5.  
  6. // Conversions between degrees and radians
  7. inline float dtor(float deg) {
  8.     return deg * M_PI / 180.0;
  9. }
  10.  
  11. inline float rtod(float rad) {
  12.     return rad * 180.0 / M_PI;
  13. }
  14.  
  15. // Pointer to error handler method for a class
  16. typedef void (*errorHandler)(int, const char *);
  17.  
  18. // Names of matrix/vector types parameterized with the preprocessor (ick)
  19. #define CVec(T) name2(T,CVec)    /* Cartesian vector of type T */
  20. #define HVec(T) name2(T,HVec)    /* Homogenous vector of type T */
  21.  
  22. #define CMat(T) name2(T,CMat)    /* Cartesian (affine) matrix of type T */
  23. #define CMatType(T) name2(T,CMatType)
  24.  
  25. #define HMat(T) name2(T,HMat)    /* Homogenous (4x4) matrix of type T */
  26. #define HMatType(T) name2(T,HMatType)
  27.  
  28. #endif /*_VECTOR_NAMES_H*/
  29.